#include "menu.h"

menu::menu()
{
}



void menu::wysMenu(BITMAP * bufor)
{
    if(this->y==1)
    {
        clear_bitmap(bufor);
        masked_blit( tlo, bufor, 0, 0 , 0 ,0,  tlo->w, tlo->h);
        masked_blit( StartOn, bufor, 0, 0 , 300 , 200,  StartOn->w, StartOn->h);
        masked_blit( ExitOff, bufor, 0, 0 , 300 ,400,  ExitOff->w, ExitOff->h);
        blit( bufor, screen, 0, 0, 0, 0, 800, 600 );

    }
    if(this->y==2)
    {
        clear_bitmap(bufor);
        masked_blit( tlo, bufor, 0, 0 , 0 ,0,  tlo->w, tlo->h);
        masked_blit( StartOff, bufor, 0, 0 , 300 , 200,  StartOff->w, StartOff->h);
        masked_blit( ExitOn, bufor, 0, 0 , 300 ,400,  ExitOn->w, ExitOn->h);
        blit( bufor, screen, 0, 0, 0, 0, 800, 600 );
    }
}

void menu::steruj()
{
    if( key[ KEY_UP ] )
    {
        this->y--;
    }
    if( key[ KEY_DOWN ] )
    {
        this->y++;
    }
    if(y<0)
    {
        y=1;
    }
    if(y>2)
    {
        y=2;
    }
}
